package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by VegetaKo on 2016/9/19.
 */
@Entity
@DynamicInsert
@Table(name = "l2r_ipms2_hotel", schema = "", catalog = "")
public class L2RIpms2Hotel   extends BaseEntity {
    private Long hotelId;
    private Long hotelGroupId;
    private String hotelName;
    private String isLimit;
    private Integer unuseRmnum;

    @Basic
    @Column(name = "hotel_id", nullable = false, length = 20)
    public Long getHotelId() {
        return hotelId;
    }

    public void setHotelId(Long hotelId) {
        this.hotelId = hotelId;
    }

    @Basic
    @Column(name = "hotel_group_id", nullable = false, length = 20)
    public Long getHotelGroupId() {
        return hotelGroupId;
    }

    public void setHotelGroupId(Long hotelGroupId) {
        this.hotelGroupId = hotelGroupId;
    }

    @Basic
    @Column(name = "hotel_name", nullable = true, length = 60)
    public String getHotelName() {
        return hotelName;
    }

    public void setHotelName(String hotelName) {
        this.hotelName = hotelName;
    }

    @Basic
    @Column(name = "is_limit", nullable = true, length = 2)
    public String getIsLimit() {
        return isLimit;
    }

    public void setIsLimit(String isLimit) {
        this.isLimit = isLimit;
    }

    @Basic
    @Column(name = "unuse_rmnum", nullable = true)
    public Integer getUnuseRmnum() {
        return unuseRmnum;
    }

    public void setUnuseRmnum(Integer unuseRmnum) {
        this.unuseRmnum = unuseRmnum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RIpms2Hotel that = (L2RIpms2Hotel) o;

        if (hotelId != null ? !hotelId.equals(that.hotelId) : that.hotelId != null) return false;
        if (hotelGroupId != null ? !hotelGroupId.equals(that.hotelGroupId) : that.hotelGroupId != null) return false;
        if (hotelName != null ? !hotelName.equals(that.hotelName) : that.hotelName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = hotelId != null ? hotelId.hashCode() : 0;
        result = 31 * result + (hotelGroupId != null ? hotelGroupId.hashCode() : 0);
        result = 31 * result + (hotelName != null ? hotelName.hashCode() : 0);
        return result;
    }
}
